package com.middlegroup.payadmin.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.middlegroup.payadmin.mapper.OutBillsMapper;
import com.middlegroup.payadmin.pojo.dto.BillsDto;
import com.middlegroup.payadmin.pojo.dto.DataGrid;
import com.middlegroup.payadmin.pojo.po.OutBills;
import com.middlegroup.payadmin.service.OutBillsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 出款订单表 服务实现类
 * </p>
 *
 * @author pc123
 * @since 2019-01-04
 */
@Service
public class OutBillsServiceImpl extends ServiceImpl<OutBillsMapper, OutBills> implements OutBillsService {

    @Resource
    private OutBillsMapper outBillsMapper;

    @Override
    public PageInfo<BillsDto> listBills(DataGrid grid, BillsDto billsDto) {
        grid.getOrderBy();
        return PageHelper.startPage(grid.getPageNum(),grid.getPageSize()).doSelectPageInfo(()-> this.outBillsMapper.listBills(billsDto));
    }
}
